var api = require('../../../utils/api.js')
var $ = require('../../../utils/util.js')
var regeneratorRuntime = require('../../../utils/runtime.js')
var app = getApp()


Page({
  data: {
    info:{},
    _longitude: 116.3972282409668, //当前地图位置的中心点(默认定位北京)
    _latitude: 39.90960456049752, //当前地图位置的中心点(默认定位北京)
    _scale: 12, //当前地图的缩放系数
    markers:[//地图图标
      {
      id: 0
      ,iconPath: "/assets/map_localtion_red.png"
      ,longitude: 116.3972282409668
      ,latitude: 39.90960456049752
      ,width: 30
      ,height: 30
      }
    ]

  },
  onLoad: function (options) {
    var info=wx.getStorageSync("videoInfo");
    wx.setStorageSync("videoInfo",null)
    if (info){ 
      // var info = JSON.parse(options.info)  
      console.log(info)
      this.setData({
         info:info,
         _longitude:info.longitude || 116.3972282409668,
         _latitude:info.latitude ||  39.90960456049752,
         markers:[//地图图标
          {
          id: 0,
          iconPath: "/assets/map_localtion_red.png",
          longitude: info.longitude || 116.3972282409668,
          latitude: info.latitude || 39.90960456049752,
          width: 30,
          height: 30,
          }
        ]
      });
    }
    console.log(this.data.markers[0].longitude+'--'+this.data.markers[0].latitude)
  },
  onShow: function () {

  },


})
